#pragma once

#include "base_type.h"

/*file operator begin*/
int32  _base_create_file( cstr_t lpszFileName, bool ReturnFalseIfExist = false );
int32  _base_copy_file( cstr_t lpszSourceFile, cstr_t lpszTargetFile, bool ReturnFalseIfExist = false );
int32  _base_delete_file( cstr_t lpszFileName );
bool   _base_is_file_exist( cstr_t lpszFileName );

string_t _base_get_ext_name( cstr_t lpszFullName );
string_t _base_get_name( cstr_t lpszFullName );
string_t _base_get_file_dir( cstr_t lpszFullName );


/*dir operator begin*/
int32  _base_create_dir( cstr_t lpszFileName, bool ReturnFalseIfExist = false );
int32  _base_copy_dir( cstr_t lpszSourceDir, cstr_t lpszTargetDir, bool isOverWriteIfExist = false );
int32  _base_delete_dir( cstr_t lpszDir );
bool   _base_is_dir_exist( cstr_t lpszDir );

bool   _base_is_dir( const char * lpszPath );
/*search file*/
int32  _base_find_file( cstr_t lpszTargetDir, vector_t<string_t> & vResult );
int32  _base_find_file( cstr_t lpszTargetDir, cstr_t lpszFileName, vector_t<string_t> & vResult );

/*other*/
int32  _base_copy_file_list( cstr_t lpszTargetDir, vector_t<string_t> & vFiles );

int32 _base_get_file_stat(cstr_t lpszFileName, struct _stat64 & rStat);
